Welcome to the NextGen Testing Platform wiki! A Description of our pages are as follows:

  • Installation Pre-requisites: Details on installation and configuration of platform pre-requisites such as java, maven, and IntelliJ IDE
  • Framework Installation: Details on downloading the framework from GitHub and installing into your IDE
  • Getting Started with NGTP: Details and illustrations on how to work with Next Gen Testing Platform (NGTP)
  • UI Installation: Details on downloading the NGTP UI and installing it
  • Getting Started with NGTP UI: Details and illustrations on how to work with NGTP UI
  • GitHub Usage Guidelines How to subscribe yourself to get updates on the most recent changes to NGTP
  • Setting up CI Pipelines: Guide on setting up GitHub Actions CI Pipelines
  • Product Versioning: Guide on versioning practices to be followed for NGTP updates and releases
  • Integrations: How to integrate with common 3rd party software
  • Troubleshooting: Common pitfalls and how to avoid them and fix them

Installation Prerequisites

Hardware/Software Requirements

S.no Requirement Minimum Recommended Special Cases
1 Processor Dual-Core Intel i5 Intel i7 or quad core for Data/ETL validations
2 RAM 8GB 16GB 32GB or more for Data/ETL validations/ Mac book Pro 32GB preferable
3 Elevated access Temporary Extended for Testing IE websites -

Install Java JDK

There are 2 options for Java installation

  • Open JDK
  • Oracle JDK

Note: Use Open JDK, unless there is an explicit requirement to use Oracle JDK, as it comes with no-strings-attached and is completely open source.

Open JDK

Install OpenJDK14 or above LTS version from here JDK 14 or above will be the most compatible. Always use Long Term Support (LTS) versions (jdk 11, 14).

Oracle JDK

  • IMPORTANT NOTE: You must request the “Java Uninstall Exception 1.0” software or else java may be uninstalled from your computer by EY
  • In order to request the exception follow the following directions:
    • Go to the EY Appstore (https://ey.service-now.com/ey/) → Go to “Order Something” → click “Get Software” → Search “Java Uninstall Exception 1.0” → click “request”
  • Install JDK 14 from https://www.oracle.com/java/technologies/javase-downloads.html
  • JDK 11 or above will be the most compatible. Always use Long Term Support (LTS) versions (JDK8, JDK11, JDK14)

    Install Maven

  • Download latest version of apache-maven from here
  • Unzip the archive to a folder in your local machine
  • Versions as old as 2.2 have been tested and work correctly. But we will not support any deprecations and you will have to update to the newer versions
**How to set New Environment Variables:**
1. Click the file explorer icon on your computer
2. Right click on "This PC" and select the "Properties" option
3. Click on advanced system settings
4. On the Advanced tab, select Environment Variables, and then click new
5. Furnish the variable name and path. Click OK

Version Control System

Subversion

Download and install Tortoise SVN from TortoiseSVN

  1. Select the latest available stable version for your machine to download (64 bit)
  2. Run the program once downloaded and click next through the setup until the custom setup page.
  3. Click command line client tools and make sure it is set to "Entire feature will be installed on local hard drive"
  4. Click install and click finish

Subversion Code Checkout

  1. Create a new folder wherever you want to maintain the project repository. Name it as per your preference.
  2. Right click the created folder and click svn checkout
  3. Enter the URL for the repository and click ok
  4. Wait for the download and then verify the folder is not empty

or,

Git

Internally, we use GitHub within EY. So this must be your choice if you are installing NGTP within EY network.

  • Download Github for desktop app or integrate Git to your IDE
  • Download Git from here and install it.
  • In IntelliJ, File -> Settings ->Version Control ->Git and set the path for the executable

Note: For the merge, fork, mirror, PR and general Github best practices refer the Github guidelines document.

Setup Environment Variables

  1. Setup new variables – Click New

    • JAVA_HOME: - e.g C:\softwares\jdk-14.0.2
    • MAVEN_HOME: -e.g C:\maven\apache-maven-3.6.3
    • M2_HOME: -e.g %MAVEN_HOME%
    • M2_REPO: -e.g C:\Users\.m2\repository
    • LICENSE_PATH: -e.g C:\Users\\licenses\NGTP\license.bin
  2. Add the following to your Path variable if not present already

    • Maven Bin folder – e.g: %MAVEN_HOME%\bin
    • Java Bin folder – e.g: %JAVA_HOME%\bin

Note: If you have any other versions of java in your path variables, either remove them or move them down below the above Java path we just set.

Test if everything works

  • To test if everything is working go to command prompt and type the following commands to verify the installation and versions are all correct:
    • where java
    • java -version
    • where maven
    • maven -version Note: All of them should give the versions of the most recently installed software. If not revisit the steps above and check if you missed any.

Download and setup IntelliJ Community Version and its dependencies

  • Download IntelliJ Community Version and its dependencies from https://www.jetbrains.com/idea/download/#section=windows
  • Click next through all the setup instructions. Click finish at the end. Required version: 2019.2.2 or later
  • In order for NG Testing Platform to run correctly in your IntelliJ environment, be sure to install the following plugins from the IntelliJ Marketplace:
    • Cucumber for Java Plugin for IntelliJ (IntelliJ Idea Marketplace, Open IntelliJ → File → Settings → Plugins)
      • Recommended Version: latest
    • Gherkin Plugin for IntelliJ (IntelliJ Idea Marketplace, Open IntelliJ → File → Settings → Plugins)
      • Recommended Version: latest
    • YAML/ANSIBLE Plugin for IntelliJ (IntelliJ Idea Marketplace, Open IntelliJ File → Settings → Plugins)
      • Recommended Version: latest

Configuring your IntelliJ to SSO into GitHub (Internal only)

In order for you to clone your projects, push and pull from GitHub every time without having to enter your user name password, you need to configure Secure Shell (SSH) on your machine and provide GitHub with that details. This will enable GitHub and your machine to communicate securely without you needing to authorize yourself. More details on this can be found here

The GitHub website has laid down the steps to generate an SSH key. Please follow the instructions diligently to set up SSH and add the key to your GitHub Settings. Do not forget to enable SSO after creating SSH. Once you have done this, you will be able to clone the projects using SSH links instead of the https URLs.

Now, navigate to File -> Settings -> Version Control and select GitHub. Click the + sign on the right side and select Login via GitHub option and follow the prompts to get SSO access to GitHub from IntelliJ. Below the window, check the checkbox that says:

  • [x] clone git repositories using ssh.

Obtaining and Configuring NGTP License

Activation Required

The library is license restricted with a digitally-signed EY license. You will need a license file or, a license token added to your environment variables to activate the tool. Get a limited duration license from our NGTP License Administrators. Email them the following details to help create your license

  • Your full name
  • Business case
  • Engagement duration (for client projects)

If given a license file,it to a secure location in your file system and note down the path. Provide the path in your environment variables in the below format. Details are provided in the above.

Key Value
LICENSE_PATH YOUR LICENSE FILE PATH

Note: Alternative way if you cannot access environment variables, if you are running locally in IntelliJ, you can go to Edit configurations > Environment Variables (under configuration tab) and save the key value pair as LICENSE_PATH=

Setting up NGTP

Understanding the NGTP layout

As mentioned earlier, Next Gen Testing Platform is a modular test harness: it needs the following to function:

  • Atleast 1 core library (etaf-core-library, etl-core-libraries etc)
  • The corresponding step-definitions library (etaf-step-definitions, etl-step-definitions etc)
  • And the cherry-on-top, the actual test automation framework which in itself is essentially a shell which needs its above libraries to be fully-functional. There are different libraries for doing different things with this framework. Namely,
  • etaf-step-definitions: Provides all the reusable steps needed for functional, UI and system testing of web applications
    • etaf-core-libraries: Provides the capabilities required by etaf-step-definitions to enable Web app testing
  • etl-step-definitions: Provides all the reusable steps needed for data and ETL testing
    • etl-core-libraries: Provides the capabilities required by etl-step-definitions to enable data and ETL testing

and many more. Please refer the wiki links for other such component libraries.

To configure your project to consume these libraries you need to add either the library dependencies to your pom.xml and cofiguring your maven settings.xml or, their library jars directly to your project and adding it to your pom.xml. This is what will be covered in the next sections.

But once completed your pom.xml will essentially contain these

            <dependency>
                <groupId>com.ey</groupId>
                <artifactId>etaf-step-definitions</artifactId>
                <version>1.1.1</version>
                <!--<systemPath>${project.basedir}/src/main/resources/JARs/etaf-step-definitions-1.1.1.jar</systemPath>-->
            </dependency>
            <dependency>
                <groupId>com.ey</groupId>
                <artifactId>etaf-core-library</artifactId>
                <version>1.1.1</version>
                <!--<systemPath>${project.basedir}/src/main/resources/JARs/etaf-core-library-1.1.1.jar</systemPath>-->
            </dependency>
            <dependency>
                <groupId>com.ey</groupId>
                <artifactId>license-validator</artifactId>
                <version>1.0.7</version>
                <!--<systemPath>${project.basedir}/src/main/resources/JARs/license-validator-1.0.7.jar</systemPath>-->
            </dependency>
            <dependency>
                <groupId>com.ey</groupId>
                <artifactId>etl-step-definitions</artifactId>
                <version>1.0.2</version>
                <!--<systemPath>${project.basedir}/src/main/resources/JARs/etl-step-definitions-1.0.2.jar</systemPath>-->
            </dependency>
            <dependency>
                <groupId>com.ey</groupId>
                <artifactId>etl-core-libraries</artifactId>
                <version>1.0.3</version>
                <!--<systemPath>${project.basedir}/src/main/resources/JARs/etl-core-libraries-1.0.3.jar</systemPath>-->
            </dependency>

Uncomment the tags above if you have downloaded the dependency jars and are storing them under src/main/resources/JARs/ folder of your project

Note: Don't panic if you do not see xxx-core-library dependencies. As long as you find xxx-step-definitions, its libraries will already be included. You are covered.

Inside EY Network

Within EY Testing I&A, we use GitHub as our tool of choice for version control and collaborative programming. If you are unfamiliar with Git and have not used GitHub before, you must review the GitHub user guides here: https://guides.github.com/

If you are tasked with working on any internal development, get access to our ey-advisory-technology-testing organization within GitHub. Refer the link for directions

  1. Once inside the organization, you need to navigate to the NGTP project and click on the Code button.
  2. Select SSH option and Copy the SSH URL from the GitHub project’s web page
  3. Open IntelliJ and then do a File -> New -> Project from Version Control
  4. Paste the URL in the modal dialog that pops open and hit clone.
  5. If you have setup your installation prerequisites correctly (SSH, Settings file, environment variables etc.) you should see that the dependencies will auto-resolve and the project will build smoothly.
  6. And your pom.xml will contain the com.ey dependencies

Trouble-shooting hints:

  • If you are prompted to select a Project SDK, then open File -> Project Structure. In the left pane, select Project Settings -> Project and select the installed JDK from the Project SDK drop down.

Note: The same process of cloning the project can also be done using GitHub desktop. Read its documentation for that.

Inside Client Network

This will be a little different than what we do internally. Here we need to migrate approved components of NGTP to the client systems. We recommend a single person migrating the NGTP to client network, setting it up, committing and pushing to their version control software. Other team members who intend to use the NGTP can pull it from the VCS.

Migrating key software to client network

  1. Once inside our ey-advisory-technology-testing organization, you need to navigate to the NGTP project.
  2. Mirror the repository to create an ngtp-. Refer steps in GitHub Guidelines
  3. Now that we have established a repository for your specific client work, this will serve as the key connection between your client work and EY NGTP.
  4. Open the ngtp- project and click on the Code button.
  5. Click Download as zip button and download it to your folder. Let's call that folder to-client.
  6. Obtain a license file from one of our license administrators, stating the business reason and giving the engagement end date. Every person who is intending to setup and use NGTP must obtain their license.
  7. Add your license file to your migration folder above.
  8. Zip the entire contents and open Media Shuttle from your browser
  9. Attach the zipped folder and send it to your EY email address (Yes, EY email address. This will be obvious in the next couple of steps). Wait for confirmation email from portals@mediashuttle.com
  10. Now, Open your client laptop and navigate to the same Media Shuttle link.
  11. Login with your EY credentials as this is limited to EY employees and contractors (This is the reason we sent the files to EY email address)
  12. Once inside, click on the My Transfers button on the top right of the ribbon.
  13. Download the zip folder you sent to yourself.
  14. Unzip the contents and save the license file to a secure location in your system.
  15. Unzip the NGTP to a location of your preference.

Setting up the pre-requisites

Follow the steps outlined in the installation prerequisites page

Setting up the NGTP

  1. Open IntelliJ and File -> New -> Project from Existing Sources and browse and select the pom.xml file inside the NGTP folder unzipped above.
  2. You will be prompted with a message box.
  3. Click the Open as a Project button
  4. If you have setup your installation prerequisites correctly (SSH, Settings file, environment variables etc.) you should see that the dependencies will auto-resolve and the project will build smoothly.

Note: It is recommended that no matter how you choose to download your repository (GitHub Desktop, IntelliJ integration, or simply downloading from GitHub) that you connect your repository to GitHub Desktop to take advantage of the UI when merging. You can add any downloaded GitHub project stored on your computer to GitHub Desktop by clicking file/add a local repository and then pathing to that repository’s location on your computer

Important

  • All users of NGTP must have knowledge of GitHub before being granted a license. Learning to use GitHub desktop and the IntelliJ GitHub plugin are key to keeping a healthy and maintainable code base.

NGTP User Interface

Product Summary

The Next Gen Testing Platform UI is a desktop application which can be set up with user’s existing NGTP (also known as Next Gen Testing Platform) project to allow them to design, execute and report test cases from a UI interface instead of having to use a developer-centric IDEs like Eclipse, IntelliJ etc. This product is a cross platform desktop application that is easy to install and intuitive to work with.

Minimum System Requirements

  1. OS: Windows 10 or macOS
  2. RAM: 8 GB
  3. Disk Space: 1GB

Software Requirements

Setup Instructions

  1. Follow all steps to set up any version of Next Gen Testing Platform framework (including setting up Java and Maven as defined in the document) – Windows Next-Gen Testing Platform Installation Procedure
  2. Use the installer “NGTP Setup 0.0.1.exe” to set up the UI application
  3. Your antivirus may flag this installation. Please ignore the warnings and allow the installation to proceed
  4. Open the NGTP.exe file
  5. Once the above application is open, go to Settings > Path and make sure that the correct back-end framework is selected

Product Understanding

What the UI is

  1. The UI is a supplement on top of existing BDD framework, so testers need not deal with a Developer IDE
  2. It can create new tests and execute tests that exist

    What the UI is not

  3. It is not a replacement for a test automation framework
  4. It is not a coding platform to develop new business code that does not exist in your framework

Scope for MVP

NGTP UI has four tabs, each having the following functionality:

Dashboard

Dashboard tab is landing page for our application. First time users need to select their default framework directory before using any other tab or features available. Dashboard, as the name implies, is available to present the user with information and shows the reports available in the framework from previous test runs.

  1. User can load test reports and view reports for previous runs
  2. User can download all reports

Test Design

Test Design tab is place where users can create their own steps and scenarios under feature files. Users can also edit available features from the chosen framework workspace. The tab is split into three sections- Feature files (Left menu). Canvas area (middle) and Page objects (right menu)

Feature File - Create/Upload/Edit

  1. User can select any project (Henceforth referred to as workspace) to work on. This will be the project name from NGTP framework (e.g. AmazonDemo, PolicyCenter etc.)
  2. User can directly upload valid feature files
  3. User can create a new feature file in the canvas and save it
  4. User can load an existing feature file to the canvas to edit it

    Building a Scenario

  5. User can add, delete or edit Scenarios within the canvas or clear the canvas itself
  6. User can search the list of Step Definitions in the left menu and add a step definition to the scenario
  7. User can rearrange, delete added steps
  8. User can add names to the feature and/or scenarios
  9. User can add any tags to the Scenarios
  10. User can switch to raw mode to edit the feature file as raw text
  11. User can switch from raw mode back to UI mode (only if its tested before UAT)
  12. Once a step is added to the scenario, users can fill-in data to the empty input boxes either by typing a value or by dragging and dropping data from the right pane. The data can either be a test data (e.g. Addresses, names etc.) or a screen element (e.g. Submit button, username text box)

Execute

Execute tab is the place where users can execute feature files that already exists in the project or created in the Design tab. Users can choose the scenarios from the feature files explorer section, with the help of search and filter functionality. There is a Run configuration drop down area where users can change basic and most used test configurations that are available in settings tab.

  1. User can select a workspace to work on. This will be the project name from NGTP framework
  2. User can select one or multiple feature files from the left menu to add them to the canvas area
  3. User can select any combination of scenarios to run from the canvas area
  4. User can change basic settings from Run Configuration menu
  5. User can execute selected scenarios. The results will be available in the Dashboard tab

Settings

Settings tab is the space where users can configure the settings needed for the framework. It contains 8 sub-tabs or sections categorized based on functionality.

  1. In the settings tab, a user is presented with all the available settings in Next Gen Testing Platform
  2. User can choose to reset all settings which will change all settings back to default values

Assumptions

  • The UI application is dependent on a working test automation framework
  • Product can only recognize step definitions if they are in a java file ending with “StepDefinitions.java”
  • Application can only read from and save feature files in the default features folder for the workspace - ~src/test/resources/{workspace}
  • Some step definitions may not get recognized by the UI and send an error “Invalid Step in the file” if their regular expression is not supported. This will be fixed as the framework gets updated
  • Product assumes default location of Step Definitions and Reusable Step Definitions based on Next Gen Testing Platform architecture as follows:
  • Reusable Step Definitions - ~src/main/java/seleniumutils/reusablestepdefinitions
  • Step Definitions- ~src/test/java/{workspace}/stepdefinitions

This will change in the next release where we can configure paths to custom step definitions

Limitations

As this is the MVP release, the product has a few limitations and assumptions:

  1. Product does not support API and ETL tests
  2. Product does not support Scenario Outlines and Examples
  3. Product does not support creating new Test Data or Page Objects
  4. Product does not support creating new Step Definitions
  5. To see all reports, leave the reports location blank in settings. Alternatively, selecting a specific html report in the Reports Location will load just this one report on the dashboard
  6. If a Feature contains a Step Definition that is not recognized, the feature file will not load on the canvas

Definitions/glossary

Feature file

Automation tests in the UI are created using Feature Files. Features files contain a list of scenarios composed of Steps written in Gherkin language which provides a way to describe your application behavior in business readable language. Each feature can have one or more scenarios, and every scenario consists of one or more steps.

Scenario

Every Scenario is an individual test case. Scenario is one of the core Gherkin structures. Every scenario starts with the keyword “Scenario:” (or localized one) and is followed by an optional scenario title. Every scenario consists of a list of steps, which must start with one of the keywords Given, When, Then, But or And.

Step or Step Definition

A step definition is a common template for a step. E.g. Given I navigate to “__”. Here you can fill any valid URLs. A Step Definition links the java code to one or more Gherkin steps. When Cucumber executes a Gherkin step in a scenario, it will look for a matching step definition to execute.

Tags

You can use tags to group features and scenarios together, independent of your file and directory structure. This allows you to run multiple tests at once.

FAQs

Q. I don’t see anything loading in the UI

A. Go to Settings>Paths and make sure that the back-end framework’s path is selected. When you click browse, the selected folder should show “src” directory and “pom.xml”

Q. Nothing loads on the dashboard or unexpected report loads

A. Go to Settings>path and make sure the path for reports is empty if you want the default reports to load or select a specific report (index.html) for it to be loaded on dashboard

Q. I selected a specific report and now I can’t clear the path to load the default view

A. To clear the path, you will have to go to Settings and click on “Reset Settings” button. Please note, this will also reset all other settings

Q. The notification says “Test execution completed” but I do not see the updated report

A. This happens if there was an error in executing the tests after build was run successfully. Make sure your back-end framework is set up correctly by running command:

  • mvn clean install to see if all default tests
  • mvn clean install -Dsource.feature="<path of the folder where your feature files are located> " -Dapplication="<applicationName>" -Denvironment="<environment name> If any one of the above commands fail, you may need to update the back-end framework’s POM.xml

    Q. I don’t know what Page Objects or Test Data values are supposed to be used when I design tests

    A. This is a limitation of the UI application and we assume that the person designing tests either knows the values in Page Objects and Test Data or can edit them in the back-end framework

    Q. I made some changes and added feature files directly in the back-end but I do not see them in the UI

    A. To reload the list of feature files, please switch the workspace and switch back to your workspace. You will find that the list of feature files is updated

    Q. I cannot uninstall the application using the uninstaller.exe

    A. This is a known issue as the uninstaller is flagged and quarantined by EY’s antivirus. Please uninstall the application by going to Control Panel > Programs > Uninstall a Program, then look for NGTP application and double click on it. Now you can follow the on-screen prompts to uninstall the application

Next Gen Testing Platform Usage Guide

Next Gen Testing Platform is a behavior driven development (BDD) based test automation framework to test Web, API, Desktop, ETL and many other applications. It enables you to write and execute automated acceptance/unit tests. Automate your test cases with minimal coding. More Details

Table of Contents

Introduction

The Next Gen Testing Platform is a comprehensive platform to accelerate testing and increase automation ROI through unique capabilities crafted by EY experience, innovation and technology. It is a modular 3-tier Test Automation Harness built using Java. Primarily, it leverages Cucumber and Java to achieve the automation objectives and uses Gherkin Language for writing test scripts that also serves a living documentation of acceptance criteria. The same harness can be used to test a variety of applications ranging from Web, Windows, API, Mobile to even Accessibility testing.

Layout

The NGTP consists of 3 layers

  • Core Libraries layer - Provides the capabilities and methods to test a specific application type
  • Workbench layer - Provides the glue/business logic that connects the steps that the tester writes to the library layer. This layer contains platform/application-specific directives for the testers to test an application type(e.g., SAP, Oracle, GW or even any web/mobile/api apps)
  • Application/Business layer - This is the layer where the tester interacts with NGTP. It contains the english-like Gherkin sentences(Given...,When..., Then...) that drive the tests. It also contains external test data and test configurattions

Usage

Once you followed all the steps to successfully install NGTP, you will be able to create new tests, run new tests and also create new testing projects.

Run a quick test to see NGTP in action

Your NGTP should come with a sample/training project called amazonDemo (unless you are in client projects in which case the framework will be stripped of any external tests). You can run its scenarios as follows

  • Navigate to src/test/resources/amazonDemo/features
  • All of the scenarios are organized under feature files
  • Pick a specific scenario you want to test.
    • Each such scenario will have been tagged with an @xyz tag. Tags, in short are for organizing tests in whichever way the team prefers (Think of instagram/facebook tags)
    • Copy the tag you want to run
  • Open src/test/java/methods/FunctionalCukesTest.java

    • Paste/replace the tags with the one you copied

    Right click on the class name and select Run FunctionalCukesTest

New Testing Project

  • Create a folder for your tests under src/test/resources using the name of your project.
  • Add the following folders according to the structure

    src/test/resources/<your_project>/data src/test/resources/<your_project>/features
    src/test/resources/<your_project>/data/inputdata
    src/test/resources/<your_project>/data/environments.yaml
    src/test/resources/<your_project>/data/<PageObjects.xlsx | PageObjects.yaml | PageObjects.json>

    • 3 formats of data are supported: xlsx, yaml, json.

    • Any step definitions you are writing should go under:

    src/test/java/seleniumutils/applicationlayer/<your_project>/stepdefinitions/*StepDefinitions.java

    • Any Page Object classes you create should go under:

    src/test/java/seleniumutils/<your_project>/pageobjects/*Page.java

  • Open cucumber.properties file and change the setting application = [your project name]

  • Any feature file you add will go under the features folder or its sub folder within the one created above

  • All object locator information will go into the PageObjects.* file created above
  • Environments.yaml holds the applications landing page url.
    • Whatever environment you are using for the landing page url, configure that against cucumber.properties' environments setting.

Writing a test

The cucumber features goes in the features library and should have the ".feature" extension. The first line of that file should always be Feature: [Feature name]

You can start out by looking at amazonDemo/features/product_checkout.feature. You can automate most applications using any of the reusable steps that comes with Next Gen Testing Platform.

Object Repositories

In Next Gen Testing Platform, page or screen locators are maintained in flat files externally. You can store all your locators in EXCEL, YAML or JSON format. The file name should always be PageObjects.xlsx/PageObjects.yaml/PageObjects.json

  • The locators will be organized in Object-oriented fashion as:

Page contains elements contains attributes

Interpreted in xlsx, this will be:

  • Page => sheets e.g Amazon sheet
  • elements => rows

Example

element_type variable value id class name xpath css linkText partialLinkText tagname
input username Text1
link asus_zenbook (//*[contains(text(),'ASUS ZenBook 13')])[1]

In JSON, this will be:

{
   "Amazon": 
   [
      {
         "element_type": "data",
         "variable": "home",
         "value": "http://www.amazon.com",
         "id": "",
         "class": "",
         "name": "",
         "xpath": "",
         "css": "",
         "linktext": "",
         "partiallinktext": "",
         "tagname": ""
      },
      {
         "element_type": "textbox",
         "variable": "search_bar",
         "value": "",
         "id": "twotabsearchtextbox",
         "class": "",
         "name": "",
         "xpath": "",
         "css": "",
         "linktext": "",
         "partiallinktext": "",
         "tagname": ""
      }
   ],
  "SecurityPage": 
   [
        {
           "element_type": "",
           "variable": "edit_name",
           "value": "",
           "id": "auth-cnep-edit-name-button",
           "class": "",
           "name": "",
           "xpath": "",
           "css": "",
           "linktext": "",
           "partiallinktext": "",
           "tagname": ""
        }
   ]
}

In YAML,

"Amazon":
  - element_type: data
    variable: home
    value: 'http://www.amazon.com'
    id: ""
    class: ""
    name: ""
    xpath: ""
    css: ""
    linktext: ""
    partiallinktext: ""
    tagname: ""

  - element_type: textbox
    variable: search_bar
    value: ""
    id: twotabsearchtextbox
    class: ""
    name: ""
    xpath: ""
    css: ""
    linktext: ""
    partiallinktext: ""
    tagname: ""

"SecurityPage":
  - element_type: ""
    variable: edit_name
    value: ""
    id: auth-cnep-edit-name-button
    class: ""
    name: ""
    xpath: ""
    css: ""
    linktext: ""
    partiallinktext: ""
    tagname: ""

  - element_type: ""
    variable: success_verification
    value: ""
    id: ""
    class: ""
    name: ""
    xpath: '//*[@id="auth-success-message-box"]/div/h4'
    css: ""
    linktext: ""
    partiallinktext: ""
    tagname: ""    

Test Data

As with Page Objects, Test data is also supported in the above 3 formats You can refer to any of the sample projects for the data formats. The path is shared above in the New project section.

Environment Properties

All Test environment properties and run configurations can either be setup through cucumber.properties or added to your POM.xml under the properties tag or even fed at runtime through command line options as -D= after your maven command. The exact syntax is highlighted below under Running the test section. But the mandatory properties are:

  • application
  • environment
  • browser

Reusable steps

By using reusable steps you can automate your test cases more quickly, more efficiently and without much coding. The reusable steps are located in the etl-step-definitions jar and etaf-step-definitions jar

Auto-fill Web Forms

With Next Gen Testing Platform you can fill either a single field or an entire page or even multiple pages with a single step using this step

I fill (.+) data from (.+) (?:yaml|sheet|json) onto the page
e.g Given I fill personal_details from checkoutpage yaml onto the page

Note: For the above example, make sure you do have a dataset called personal_details in your checkoutpage.yaml (or json or excel sheet) to test this example

Dynamic/Random Data Generation

Next Gen Testing Platform allows you to generate commonly used data like name, addresses Identification informations automatically. You only have to specify either what information you want or what pattern of data you want to be entered into a particular field and then Next Gen Testing Platform automatically generates that information for you. This helps every test run of yours to be unique.

Running tests

Terminal

Go to your project directory from terminal and hit following commands

    mvn test|install (default will run on local firefox browser)
    mvn test|install "-D<propertyname>=value` e.g `mvn test "-Dbrowser=chrome" (to use any other browser)
    e.g. mvn clean install -Dapplication=amazonDemo
    It will automatically run all the tests under features directory provided the properties in pom.xml are configured appropriately

Alternative: This command can be configured in a batch file and then simply double-clicking the file will run the scenarios for you. The batch file can also be run using windows scheduler on a regular schedule.

  • The following link explains about more maven commands for running cucumber scenarios

IDE

  • Open FunctionalCukesTest.java located under src/test/java/methods
  • Add the tag you want to run under CucumberOptions Annotation
  • Click Run button on the top right of your IDE (or from your right click context menu)

Parallel Execution

Using Cucable Plugin

Next Gen Testing Platform uses Cucable plugin to parallelize the execution process. All you have to do is open the pom.xml and update a few settings under the configurations tag of com.trivago.rta cucable plugin highlighted below

<plugins>
...
            <plugin>
                <groupId>com.trivago.rta</groupId>
                <artifactId>cucable-plugin</artifactId>
                <version>1.5.1</version>
                <executions>
                    <execution>
                        <id>generate-test-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>parallel</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceRunnerTemplateFile>src/test/java/methods/CucableJavaTemplate.java</sourceRunnerTemplateFile>
                    <sourceFeatures>${project.basedir}/src/test/resources</sourceFeatures>
                    <includeScenarioTags>${tags}</includeScenarioTags>
                </configuration>
            </plugin>
...
</plugins>

In the above section, verify if,

  • sourceRunnerTemplateFile points to your CucableJavaTemplate.java file
  • sourceFeatures points to your feature file directory or its parent
  • includeScenarioTags is either commented out (to run all scenarios under the sourceFeatures directory) or has one or more tags that needs to run.

Using Native Cucumber

Refer the remove cucable plugin steps documentation for a step-by-step walk-through on this.

License

© 2020 Ernst & Young LLP. All Rights Reserved. Any unauthorized use or disclosure is strictly prohibited.


Third-Party Integrations

NGTP is built modularly and it can support a whole lit of java libraries. If its a java library, it works with NGTP. If the library is hosted in a Central repository like maven you can simply copy/paste its dependency in the pom.xml under <dependencies></dependencies>

Test Containerization

NGTP supports Docker/Kubernetes based test containerization and distributed parallel execution. Here is how you will do it.

Azure DevOps

NGTP can be deployed to Azure Devops as easily as it can be pushed to a GitHub repository. Here is how you will do it.

Report Portal

Report portal is an AI powered Test Automation Dashboard. It can:

  • One-place dashboard
  • Analyze results
  • Live-streaming of results
  • Defect traceability and automated issue-bucketing
  • Visualization

Here is how you will do it.


Setting up CI Pipelines

  • The Trunk master branch will have a CI pipeline setup using CircleCI to make sure every PR is tested before merged.
  • Once your Fork is setup, You can add CI pipelines to automate the build process using CircleCI as below:

GitHub Usage Guidelines

Setting Up Your GitHub Account

  • First go to www.github.com and create a free account using your EY email (must use EY email in order to gain access to the EY GitHub organization)

  • After you create/own a GitHub account, an owner/admin of the EY advisory technology testing GitHub organization will be able to send you an email that looks like this:

  • Once you click to join you will be prompted to set up two-factor authentication. As a security measure we are requiring two-factor authentication be set up on a registered EY device (i.e. a phone with EY email enabled and all necessary security measures to enable EY email set up)
  • In order to avoid frequent login, users may set up a personal security key with your GitHub account
  • The process to do so is documented on the following page under the title "Configuring two-factor authentication using a security key"
  • You will now be able to access the EY advisory Technology Testing repository here https://github.com/ey-advisory-technology-testing

Note: GitHub enterprise licenses are scarce and will only be allotted with a strong business case.

Access to Repositories

  • Every member of GitHub will belong to one or more GitHub teams.
  • Only the teams will be assigned to projects and will have access to repositories
  • Members in turn get access to repositories for which their team is assigned access.
  • No individual (except admins and Org. owners) will be directly assigned to a repository.
  • Every team in turn needs to enforce proper access controls on individuals(read, write or admin).
  • Only team leads get admin access
  • Contributors get write access
  • Everyone else read access
  • For certain confidential and IP-protected repositories, access is strictly controlled and will be based on business justification only.

Creating a New project

Conventions

Naming Repos

  • All project names should be in lower case hyphenated form.
    • star-wars
    • the-empire-strikes-back
    • return-of-the-jedi
  • Avoid camelCase, title-case, upper-case. The problem with camel case is that there are often different interpretations of words - for example, checkinService vs checkInService. Also, it is difficult with auto-completion if you have many similarly named repos to have to constantly check if the person who created the repo you care about used a certain breakdown of the upper and lower cases. It's also best to avoid upper case, no one likes yelling.
  • Avoid organization monikers, jargons and abbreviations unless they are highly popular and familiar to non-technical audience(e.g. SQL, EY)
  • Be specific (guidewire-core-library instead of insurance-core-library because we may have other technologies for insurance suite automation later on)
  • Once established, it's a simple task to change repo names, BUT it can have unintended consequences like breaking downstream links - so think about a name that can be stable over a long period of time.

Mandatory Contents

README

  • All of them should have a detailed README.md created in Markdown
    • Brief introduction about the project
    • Installation instruction
      • If it is intended to be used as JAR dependency, then this section should contain the dependency details or JAR installation details to be able to use it
      • If it is intended to be used as a standalone project, then this section should contain the installation instructions to use it.
    • Usage
      • Detailing the features and capabilities and how to use them
    • LICENSE appendix
      • Refer NGTP trunk project GitHub Workflows
  • Every project should be built with CICD in mind. IT should contain an actions workflow for Pull Request (PR) approval process and one for release process License Disclaimer file
  • Every project should have an EY License disclaimer file, whether or not it will be taken to client systems.

Cloning your project

  • If you are unfamiliar with Git and have not used GitHub before, you can review the GitHub user guides here: https://guides.github.com/
  • GitHub can be leveraged in multiple ways, two of the most convenient of which are GitHub desktop and IntelliJ's Git integration
  • GitHub desktop is a desktop application created by GitHub that allows the user to exercise all Git operations through a very user friendly and easy to learn UI
  • To install GitHub Desktop for free simply download the application here: https://desktop.github.com/
  • A comprehensive guide on how to use GitHub desktop can be found here: https://help.github.com/en/desktop
  • If you would like to instead use IntelliJ's built in Git capability to manage the installation of your repository, you can open IntelliJ and download your project directly to your IDE by selecting file -> new -> project from version control/git
  • Copy and paste the clone URL from the GitHub project's web page to your IntelliJ clone window

  • After hitting clone your project will be downloaded to your local file system

  • In GitHub, click on the watch drop down button on the top right corner of the project Select Custom -> Releases. This will notify you if there are any new releases in the project. Do this for all the GitHub projects that you need to keep track of. Especially the libraries that NGTP is directly depending on (etaf-helpers, etaf-core-library, etaf-step-definitions etc).

Important

  • All users of NGTP must have knowledge of GitHub before being granted a license. Learning to use GitHub desktop and the IntelliJ GitHub plugin are key to maintaining a clean project

Mirroring Repositories

In case you need to use NGTP at your client engagement, you will need to mirror the ngtp-official repository. The steps for that is outlined here. Refer to the first section on mirroring a repository and follow the steps.

  • Navigate to the NGTP Official repository .
  • In order to ensure repo maintenance, only those with organizational owner roles will be allowed to push to the ngtp-official.
  • Product team leaders will instead make a mirror repository based on the ngtp-official for their product team to work on.
  • Once you have mirrored the repo you will have full control over your repository and be able to share the repository with your team as long as they are registered members of the EY Advisory Technology Testing GitHub organization (restrictions to organization members and requirement of two-factor authentication will still be enforced through forks, however you can grant your team access to write your project repo)

Repository Settings

Development Guidelines

Code Pulls

All projects within our organization must follow the standards and guidelines outlined below.

  1. We follow a pull before push methodology when collaborating in GitHub. It means everyone needs to take updates from the master branch before pushing their on changes. This will minimize merge conflicts and prevent broken code.
  2. We recommend taking a pull/updating your project as often as possible (depending on how frenetic development in your repository is)

Code Pushes and PR process

Ensure you have taken an update before you begin working on pushing the code back to GitHub.

  • We strictly follow a feature branch push methodology for pushing our code. It means no one should be pushing code directly to the master branch. Master/Main branch is considered sacrosanct and un tested and unreviewed code shall not be pushed into it. Below is a proper way of pushing code:

    1. Every code push must address a specific requirement(from Jira). If there is no Jira requirement, your team must create it and use that id for the PR.
    2. Analyst commits his changes
    3. Analyst pushes his changes to feature/ or fix/ branch. This template must be followed for long-term maintenance reasons. Examples
      • **feature/NGE-123 - If you are pushing a functionality.
      • fix/NGE-25 – if you are fixing a bug introduced in the code.

    1. GitHub creates a new branch as created above
    2. Analyst creates pull request of new code into master branch using the PR template setup by the lead
    3. Analyst selects at least 1 reviewer for the PR and one of the peers/lead should review the code before merging it in.

    4. Whoever merges the code in should delete the branch so that the repository is kept uncluttered.

Merging useful code back to the NGTP Trunk

During the course of the project, the team might create tools, libraries or methods that could be a value add for our NGTP. This is one of the key ways NGTP can grow as a platform, through peer and project contributions.

In case if there are such candidates to be incorporated into the trunk, cut a branch called release. In IntelliJ, switch to that release branch and create a PR to the Trunk. It will be reviewed by the NGTP admins and if approved will be merged into the Trunk.

Keeping your projects in sync and up-to-date with Trunk

For everyone who is using NGTP at the client location and whoever needs to subscribe to all the updates from NGTP, please follow the below steps to subscribe to the NGTP release. This step needs to be performed for all our EY libraries used by your project. The list of libraries can be obtained from your pom.xml. Look for any dependency that says com.ey. e.g

         <dependency>
            <groupId>com.ey</groupId>
            <artifactId>etaf-step-definitions</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>com.ey</groupId>
            <artifactId>etl-step-definitions</artifactId>
            <version>1.0.4</version>
        </dependency>

Whenever there is an update or a release notification to any of these repositories, if you are within EY network, update the corresponding dependency version in your project's pom.xml to take the latest update. If you are within the client network, follow the steps outlined in Installing NGTP at client network to get your project updated.

Product Versioning

We will be following the below versioning strategy for our projects.

  • Important

    • .. e.g. 1.0.1 meaning 1st patch release after the 1st major release.
    • Every time, a major integration is added, update the major version number and push.
    • Every time you add a significant change or added new capability, update the minor version number and push.
    • For every other push to any project update the patch number.


Product Versioning

  • We will be following the below versioning strategy for our projects.
  • Important
    • .. e.g 1.0.0 (meaning 1st Major release with no minor updates or patches/fixes.
    • Every time, a major integration is added, update the major version number and push.
    • Every time you add a significant change or added new capability, update the minor version number and push.
    • For every change pushed to master after a release let us update the patch number.
  • What constitutes a release? – We will have 2 releases per year. Once every 2 quarters. If we have substantial changes, we will update to a new release version and communicate to all forks to update to the latest release
  • All code will be required to be merged to the trunk-master on a monthly basis. Reminder emails for these merges as well as any other necessary merges that come up will be sent in advance and a calendar of these planned merges will be hosted on SharePoint here
  • The initial move to GitHub and new code management strategy will take some effort and cooperation on all our parts at the beginning, but should improve both the rate at which we are able to internally develop new tools and the stability of our product teams’ engagement branches moving forward

Framework Troubleshooting

Issue: Repository blocked from downloading

If download of repository is blocked due to any restrictions, please see the below work arounds in order of convenience:

  1. Upload framework to GitHub and transfer to client machine
  2. Zip-up framework and upload to a shared drive for download
  3. Copy files to notepad and email to client
    • Please note that if the workarounds are used manual updates will need to be taken from the central repository.
    • If framework is not routinely kept up to date, the practice may not be able to continue supporting the framework.

Issue: IntelliJ run button not executing

Below please find the steps to fix the issue:

  1. File -> Settings -> Plugins
  2. Uncheck Gradle
  3. Click Apply
  4. Restart IntelliJ
  5. Click Run

Issue: Maven dependencies not downloading

Alternative method 1 (preferred):

If you are unable to download dependencies directly through the pom, you can manually setup maven by copying the .m2 folder from the SharePoint and exporting it to specified location on your laptop or VDI. SharePoint link: https://sites.ey.com/:u:/s/TestingiCOP/TestAutomation/EbDwXaiL3zRCr1j_X3746U4BJ8UXbFmWcZ63R1nHk4IueQ Location to unzip to: C:\Users{your_username}

If you are unable to download maven at all, you can send over the following Apache.zip. SharePoint link: https://sites.ey.com/:u:/s/TestingiCOP/TestAutomation/EZo9K4R-KI1DqJn2kyDL_pQBB5IC5IUfqG7mPyUHfsmUxw Location to unzip to: C:\Program Files

Alternative method 2:

If you are unable to download dependencies directly through the pom, you can manually download the dependencies listed at the below link from https://mvnrepository.com/.

List of dependencies: https://sites.ey.com/:w:/s/TestingiCOP/TestAutomation/EWSnYPRJ9RxLmDN_lnByUXkBZ0cOUsrbmdQXtsb7Ko8zGg Steps to manually add maven dependencies as jars:

  1. Go to https://mvnrepository.com/
  2. Download all dependencies above as jars
  3. Open IntelliJ
  4. File->Project Structure->Modules->Dependencies
  5. Click +
  6. Select Jars or directories
  7. Select Jar file
  8. Click ok
  9. Repeat for all dependencies

EY Hosted Dependencies

If the dependencies are from EY like com.ey.xyz refer to the last page in this document about Using GitHub Hosted Dependencies

Issue: Failure on running a scenario (Command length is too long etc.)

  1. Click Run -> Edit Configurations
  2. Open the JUnit or TestNG Configuration you were running
  3. On the right side look for the drop-down, `Shorten Command Line:'
  4. From the drop down select the last option: @argfile (Java 9+) - java @argfile classname [args]